package _11对象流;

import java.io.*;

/**
 * 对象输出流
 * 将内存中得对象输出到文件中
 */
public class ObjectOutputStreamDemo {
    public static void main(String[] args) throws IOException {
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("day11\\abd\\person.txt"));

        Person p = new Person("凤姐",30);

        oos.writeObject(p);

        oos.close();
    }
}
